<h3><{$mod_name}> - <{$menu_name}></h3>


<{if $fields}>
 <div class="head" style="font-size:130%;"><{$smarty.const._MD_A_FLATDATA_FLD_LIST}></div>
  <table cellpadding="5" border="1" style="border-collapse:collapse;empty-cells:show; border-color:#666;margin-bottom:16px;">
	<tr>
		<th>FID</th>
		<th><{$smarty.const._MD_A_FLATDATA_FLD_FNAME}></th>
		<th><{$smarty.const._MD_A_FLATDATA_FLD_FORDER}></th>
		<th><{$smarty.const._MD_A_FLATDATA_FLD_VISIBLE}></th>
		<th><{$smarty.const._MD_A_FLATDATA_FLD_MOBILE_VISIBLE}></th>
		<th></th>
	</tr>
	<{foreach item=f from=$fields}>
	  <tr class="<{cycle values='odd,even'}>">
	  	<td><{$f.fid}></td>
	  	<td><{$f.fname}></td>
	  	<td><{$f.forder}></td>
	  	<td><{$f.visible}></td>
	  	<td><{$f.mobile_visible}></td>
	  	<td><a href="<{$myurl}>/admin/index.php?page=fields&amp;fid=<{$f.fid}>"><{$smarty.const._EDIT}></a></td>
	  </tr>
	<{/foreach}>
  </table>
<{/if}>


<div class="head" style="font-size:130%;<{if $editfield}>background:#fcf;<{/if}>"><{$smarty.const._MD_A_FLATDATA_FLD_NEWEDIT}></div>
<form id="fieldsform" name="fieldsform" action="<{$myurl}>/admin/index.php?page=fields" method="post" style="margin:0;">
  <table cellpadding="5" border="1" style="border-collapse:collapse;empty-cells:show; border-color:#666;">
	<tr>
		<td class="head"><{$smarty.const._MD_A_FLATDATA_FLD_FNAME}></td>
		<td class="odd"><input type="text" name="fname" id="fname" size="60" maxlength="60" value="<{$editfield.fname}>" /></td>
	</tr>
	<tr>
		<td class="head"><{$smarty.const._MD_A_FLATDATA_FLD_FORDER}></td>
		<td class="odd"><input type="text" name="forder" id="forder" value="<{if $editfield.forder}><{$editfield.forder}><{else}>0<{/if}>" /></td>
	</tr>
	<tr>
		<td class="head"><{$smarty.const._MD_A_FLATDATA_FLD_VISIBLE}></td>
		<td class="odd">
			<input type="radio" name="visible" value="1" <{if $editfield.visible==1 || !$editfield}>checked="CHECKED"<{/if}>><{$smarty.const._YES}>&nbsp;
			<input type="radio" name="visible" value="0" <{if $editfield && $editfield.visible==0}>checked="CHECKED"<{/if}>><{$smarty.const._NO}>
	</tr>
	<tr>
		<td class="head"><{$smarty.const._MD_A_FLATDATA_FLD_MOBILE_VISIBLE}></td>
		<td class="odd">
			<input type="radio" name="mobile_visible" value="1" <{if $editfield.mobile_visible==1}>checked="CHECKED"<{/if}>><{$smarty.const._YES}>&nbsp;
			<input type="radio" name="mobile_visible" value="0" <{if !$editfield || $editfield.mobile_visible==0}>checked="CHECKED"<{/if}>><{$smarty.const._NO}>
	</tr>
	<tr>
		<td class="foot">&nbsp;</td>
		<td class="foot">
			<input type="submit" name="edit" id="edit" value="<{$smarty.const._SUBMIT}>" />
			<{if $editfield}>
			  <input type="button" value="<{$smarty.const._DELETE}>" onclick='if(document.fieldsform.fid.value!=0)if(confirm("<{$smarty.const._MD_A_FLATDATA_FLD_DEL_MSG}>")){document.fieldsform.delf.value="1"; submit();}' />
			<{/if}>
			<input type="hidden" name="fid" value="<{if $editfield.fid}><{$editfield.fid}><{else}>0<{/if}>" id="fid" />
			<{$gticket}>
		</td>
	</tr>
  </table>
  <input type="hidden" name="delf" value="" />
</form>


